package com.xms.ribbonbutton.service;

import com.xms.core.data.Entity;
import com.xms.form.core.FormState;
import com.xms.ribbonbutton.entity.RibbonButton;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * RibbonButtonStatusSetter
 * </p>
 *
 * @author migo
 * @since 2021/9/9
 */
@Service
public class RibbonButtonStatusSetter implements IRibbonButtonStatusSetter{

    @Override
    public void set(List<RibbonButton> buttons, FormState formState, Entity record) {
        for (RibbonButton item : buttons)
        {
            RibbonButtonExtensions.setButtonStatus(item, formState, record);
        }
    }
}
